/**
 * Generate time : 2011-12-19 16:17:16
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCELubricationStandard table comment : 润滑标准
 */
public class ZMCELubricationStandard extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEquipmentId = " "; /* 对应设备ID */
	private String fdStandardsForm = " "; /* 标准形式 */
	private Long fdSerial = new Long(0); /* 顺序号 */
	private String fdPoint = " "; /* 润滑点 */
	private String fdCycletime = " "; /* 换油周期 */
	private String fdOilName = " "; /* 润滑油名称 */
	private String fdOilType = " "; /* 润滑油型号 */
	private String fdCheckCycle = " "; /* 检查周期 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应设备ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStandardsForm");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("标准形式");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSerial");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("顺序号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPoint");
		eiColumn.setFieldLength(40);
		eiColumn.setDescName("润滑点");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCycletime");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("换油周期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOilName");
		eiColumn.setFieldLength(40);
		eiColumn.setDescName("润滑油名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOilType");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("润滑油型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCheckCycle");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("检查周期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCELubricationStandard() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEquipmentId - 对应设备ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 对应设备ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdStandardsForm - 标准形式
	 * 
	 * @return the fdStandardsForm
	 */
	public String getFdStandardsForm() {
		return this.fdStandardsForm;
	}

	/**
	 * set the fdStandardsForm - 标准形式
	 */
	public void setFdStandardsForm(String fdStandardsForm) {
		this.fdStandardsForm = fdStandardsForm;
	}

	/**
	 * get the fdSerial - 顺序号
	 * 
	 * @return the fdSerial
	 */
	public Long getFdSerial() {
		return this.fdSerial;
	}

	/**
	 * set the fdSerial - 顺序号
	 */
	public void setFdSerial(Long fdSerial) {
		this.fdSerial = fdSerial;
	}

	/**
	 * get the fdPoint - 润滑点
	 * 
	 * @return the fdPoint
	 */
	public String getFdPoint() {
		return this.fdPoint;
	}

	/**
	 * set the fdPoint - 润滑点
	 */
	public void setFdPoint(String fdPoint) {
		this.fdPoint = fdPoint;
	}

	/**
	 * get the fdCycletime - 换油周期
	 * 
	 * @return the fdCycletime
	 */
	public String getFdCycletime() {
		return this.fdCycletime;
	}

	/**
	 * set the fdCycletime - 换油周期
	 */
	public void setFdCycletime(String fdCycletime) {
		this.fdCycletime = fdCycletime;
	}

	/**
	 * get the fdOilName - 润滑油名称
	 * 
	 * @return the fdOilName
	 */
	public String getFdOilName() {
		return this.fdOilName;
	}

	/**
	 * set the fdOilName - 润滑油名称
	 */
	public void setFdOilName(String fdOilName) {
		this.fdOilName = fdOilName;
	}

	/**
	 * get the fdOilType - 润滑油型号
	 * 
	 * @return the fdOilType
	 */
	public String getFdOilType() {
		return this.fdOilType;
	}

	/**
	 * set the fdOilType - 润滑油型号
	 */
	public void setFdOilType(String fdOilType) {
		this.fdOilType = fdOilType;
	}

	/**
	 * get the fdCheckCycle - 检查周期
	 * 
	 * @return the fdCheckCycle
	 */
	public String getFdCheckCycle() {
		return this.fdCheckCycle;
	}

	/**
	 * set the fdCheckCycle - 检查周期
	 */
	public void setFdCheckCycle(String fdCheckCycle) {
		this.fdCheckCycle = fdCheckCycle;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdStandardsForm(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStandardsForm")), fdStandardsForm));
		setFdSerial(NumberUtils.toLong(StringUtils.toString(map.get("fdSerial")), fdSerial));
		setFdPoint(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPoint")), fdPoint));
		setFdCycletime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCycletime")), fdCycletime));
		setFdOilName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOilName")), fdOilName));
		setFdOilType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOilType")), fdOilType));
		setFdCheckCycle(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCheckCycle")), fdCheckCycle));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdStandardsForm", StringUtils.toString(fdStandardsForm, eiMetadata.getMeta("fdStandardsForm")));
		map.put("fdSerial", StringUtils.toString(fdSerial, eiMetadata.getMeta("fdSerial")));
		map.put("fdPoint", StringUtils.toString(fdPoint, eiMetadata.getMeta("fdPoint")));
		map.put("fdCycletime", StringUtils.toString(fdCycletime, eiMetadata.getMeta("fdCycletime")));
		map.put("fdOilName", StringUtils.toString(fdOilName, eiMetadata.getMeta("fdOilName")));
		map.put("fdOilType", StringUtils.toString(fdOilType, eiMetadata.getMeta("fdOilType")));
		map.put("fdCheckCycle", StringUtils.toString(fdCheckCycle, eiMetadata.getMeta("fdCheckCycle")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}